package com.magicsoft.share.adapter.my;

import android.support.annotation.LayoutRes;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.magicsoft.share.R;
import com.magicsoft.share.bean.my.GoldDetail;

/**
 * Created by lyf on 2017/11/7/007.
 */

public class RecordGoldAdapter extends BaseQuickAdapter<GoldDetail.ListBean, BaseViewHolder> {


    public RecordGoldAdapter(@LayoutRes int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, GoldDetail.ListBean item) {
        helper.setText(R.id.tv_title,item.getEventName()).setText(R.id.tv_time,item.getCreateTime());
        if (item.getAmount()>0){
            helper.setText(R.id.tv_num,"+"+item.getAmount());
        }else {
            helper.setText(R.id.tv_num,""+item.getAmount());
        }

    }
}
